package com.sdgakj.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name="f_msg")
public class Message extends IdEntity {
	
	private String msg;  
	private String type ="1";
	private String device ="3";//默认值是3，试试报错不
	private Date createdate;
	private String deltag="0";
	private String mode;
	private Long userId;
	private String title;
	private Long cid;
	private String link;
	private int category;



	public Long getCid() {
		return cid;
	}

	public void setCid(Long cid) {
		this.cid = cid;
	}


	public int getCategory() {
		return category;
	}

	public void setCategory(int category) {
		this.category = category;
	}


	public Message(){
	}
	
	public Message(Long id){
		this.id = id;
	}
	
	public String getMsg() { return msg;
	}


	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public String getDevice() {
		return device;
	}

	public void setDevice(String device) {
		this.device = device;
	}


	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCreatedate() {
		return createdate;
	}


	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}

	@JsonIgnore
	public String getDeltag() {
		return deltag;
	}

	public void setDeltag(String deltag) {
		this.deltag = deltag;
	}

	@Override
	public String toString() {
		return super.toString();
	}

	public String getMode() {
		return mode;
	}


	public void setMode(String mode) {
		this.mode = mode;
	}

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}


}
